package com.javacoo.junit.generator.internal.util;

import java.io.StringWriter;
import java.util.LinkedHashMap;
import java.util.Map;

import org.yaml.snakeyaml.Yaml;

/**
 * Yaml工具类
 * <li></li>
 *
 * @author: duanyong@jccfc.com
 * @since: 2021/1/11 9:38
 */
public class YamlUtility {
    public static void load(String path){
        Map<String, Object> data = new LinkedHashMap<String, Object>();
        data.put("name", "Silenthand Olleander");
        data.put("race", "Human");
        data.put("traits", new String[] { "ONE_HAND", "ONE_EYE" });
        Yaml yaml = new Yaml();
        StringWriter writer = new StringWriter();
        yaml.dump(data, writer);
    }
}
